﻿using SD.Infrastructure.RepositoryBase;
using SlamDunk.MES.Domain.Entities.ExecutionContext;
using SlamDunk.MES.ReportView.Models;
using SlamDunk.ValueObjects.Enums;
using System;
using System.Collections.Generic;

namespace SlamDunk.MES.Domain.IRepositories.Interfaces.ExecutionContext
{
    /// <summary>
    /// 工单实际物料仓储接口
    /// </summary>
    public interface IWorkOrderActualMaterialRepository : IEntityRepository<WorkOrderActualMaterial>
    {
        #region # 获取工单实际物料列表 —— ICollection<WorkOrderActualMaterial> Find(Guid workOrderId)
        /// <summary>
        /// 获取工单实际物料列表
        /// </summary>
        /// <param name="workOrderId">工单Id</param>
        /// <returns>工单实际物料列表</returns>
        ICollection<WorkOrderActualMaterial> Find(Guid workOrderId);
        #endregion

        #region # 获取作业计划物料概要列表 —— ICollection<MaterialSummaryInfo> GetMaterialSummariesByExecutionPlan(...
        /// <summary>
        /// 获取作业计划物料概要列表
        /// </summary>
        /// <param name="executionPlanId">作业计划Id</param>
        /// <param name="directionType">物料输入/输出类型</param>
        /// <returns>物料概要列表</returns>
        ICollection<MaterialSummaryInfo> GetMaterialSummariesByExecutionPlan(Guid executionPlanId, MaterialDirectionType directionType);
        #endregion

        #region # 获取物料投入周期概要字典 —— {DateTime, MaterialQuantityInfo[]} GetMaterialInputPeriodicSummaries(...
        /// <summary>
        /// 获取物料投入周期概要字典
        /// </summary>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <returns>物料投入周期概要字典</returns>
        /// <remarks>
        /// 键：日期，值：物料数量列表
        /// </remarks>
        IDictionary<DateTime, MaterialQuantityInfo[]> GetMaterialInputPeriodicSummaries(DateTime startTime, DateTime endTime);
        #endregion
    }
}
